import request from '@/utils/request'

// 查询广告列表
export function listSimpleAdvertising(query) {
  return request({
    url: '/simple/simpleAdvertising/list',
    method: 'get',
    params: query
  })
}

// 查询广告详细
export function getSimpleAdvertising(advertisingId) {
  return request({
    url: '/simple/simpleAdvertising/' + advertisingId,
    method: 'get'
  })
}

// 新增广告
export function addSimpleAdvertising(data) {
  return request({
    url: '/simple/simpleAdvertising',
    method: 'post',
    data: data
  })
}

// 修改广告
export function updateSimpleAdvertising(data) {
  return request({
    url: '/simple/simpleAdvertising',
    method: 'put',
    data: data
  })
}

// 删除广告
export function delSimpleAdvertising(advertisingId) {
  return request({
    url: '/simple/simpleAdvertising/' + advertisingId,
    method: 'delete'
  })
}

// 导出广告
export function exportSimpleAdvertising(query) {
  return request({
    url: '/simple/simpleAdvertising/export',
    method: 'get',
    params: query
  })
}